package wfw.cn.ktc_common.entity;

import java.io.Serializable;

public class Result implements Serializable {
    private Boolean flag;

    private Integer code;

    private String message;

    private Object data;

    public Result() {
    }

    public Result(ResultCode resultCode,Object data) {
        this.code=resultCode.getCode();
        this.message=resultCode.getMessage();
        this.flag=resultCode.getFlag();
        this.data=data;
    }

    public Result(ResultCode resultCode) {
        this.code=resultCode.getCode();
        this.message=resultCode.getMessage();
        this.flag=resultCode.getFlag();
    }

    public Result(Boolean flag, Integer code, String message) {
        this.flag = flag;
        this.code = code;
        this.message = message;
    }

    public Result(Boolean flag, Integer code, String message, Object data) {
        this.flag = flag;
        this.code = code;
        this.message = message;
        this.data = data;
    }

    public Boolean getFlag() {
        return flag;
    }


    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

    public Object getData() {
        return data;
    }
}
